﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTO;
using BUS;

namespace EC21_EDiamond.Admin
{
    public partial class QuanLyCongTyVanChuyen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        protected void btnThemCTVC_Click(object sender, EventArgs e)
        {
            CongTyVanChuyenDTO ctDTO = new CongTyVanChuyenDTO();
            ctDTO.TenCTVC = txtTenCTVC.Text;
            ctDTO.DiaChi = txtDiaChi.Text;
            ctDTO.DienThoai = txtDienThoai.Text;
            ctDTO.Email = txtEmail.Text;

            CongTyVanChuyenBUS ctBUS = new CongTyVanChuyenBUS();
            if (ctBUS.ThemCTVC(ctDTO) == 1)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Alert", "alert('Thành công!');", true);
                GridView1.DataBind();
            }
        }
    }
}